﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Model
{
    public class CategoryItem
    {
        private int countFiles = 0;
        private int id = -1;
        private string name = string.Empty;

        public int CountFiles
        {
            get
            {
                return this.countFiles;
            }
            set
            {
                this.countFiles = value;
            }
        }

        public int ID
        {
            get
            {
                return this.id;
            }
            set
            {
                this.id = value;
            }
        }

        public string Name
        {
            get
            {
                return this.name;
            }
            set
            {
                if (value == string.Empty)
                {
                    throw new Exception("Поле ім'я категорії не може бути пустим");
                }
                this.name = value;
            }
        }
    }
}
